﻿/*===================================================
* CLR版本  : 4.0.30319.42000 
* 类名称   : AEvent
* 文 件 名 : AEvent 
* 类描述   :
* 创建人   : oream
* 创建时间 : 2018/3/5 18:16:15
* 修改人   : 
* 修改时间 :
* 版本： @version 1.0
=====================================================*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
  public abstract class AEvent : IEvent
  {
    public void Handler()
    {
      this.Run();
    }

    public void Handler(object obj)
    {
      throw new NotImplementedException();
    }

    public void Handler(object obj1, object obj2)
    {
      throw new NotImplementedException();
    }

    public void Handler(object obj1, object obj2, object obj3)
    {
      throw new NotImplementedException();
    }

    public abstract void Run();
  }

  public abstract class AEvent<T> : IEvent
  {
    public void Handler()
    {
      throw new NotImplementedException();
    }

    public void Handler(object obj)
    {
      this.Run((T)obj);
    }

    public void Handler(object obj1, object obj2)
    {
      throw new NotImplementedException();
    }

    public void Handler(object obj1, object obj2, object obj3)
    {
      throw new NotImplementedException();
    }

    public abstract void Run(T obj);
  }

  public abstract class AEvent<T1, T2> : IEvent
  {
    public abstract void Run(T1 t1, T2 t2);

    public void Handler()
    {
      throw new NotImplementedException();
    }

    public void Handler(object obj)
    {
      throw new NotImplementedException();
    }

    public void Handler(object obj1, object obj2)
    {
      this.Run((T1)obj1, (T2)obj2);
    }

    public void Handler(object obj1, object obj2, object obj3)
    {
      throw new NotImplementedException();
    }
  }


  public abstract class AEvent<T1, T2, T3> : IEvent
  {
    public abstract void Run(T1 t1, T2 t2, T3 t3);
    public void Handler()
    {
      throw new NotImplementedException();
    }

    public void Handler(object obj)
    {
      throw new NotImplementedException();
    }

    public void Handler(object obj1, object obj2)
    {
      throw new NotImplementedException();
    }

    public void Handler(object obj1, object obj2, object obj3)
    {
      this.Run((T1)obj1, (T2)obj2, (T3)obj3);
    }
  }

}
